<template>
	<!-- 法人乡村民宿记账 -->
	<view class="container">
		<uni-transition :duration="1000" :mode-class="'slide-bottom'"  :show="true" >
			<view class="" v-if="object.adopt_id==2" style="text-align: center;margin: 20rpx 0;">
				<text style="color:#FC3E2C;font-weight: bold;" >未通过原因:{{object.fail}}</text>
			</view>
		</uni-transition>
		<form @submit="formSubmit" @reset="formReset">
			<uni-transition :duration="1000"  :mode-class="'slide-right'"  :show="true" >
			<view class="container-back" style="padding-top: 0;margin-top: 20rpx;" >
				<view class="back padding20  " >
					<view class="fontWeight" style="margin-bottom: 20rpx;">日期</view>
					<u-line color="#dadada" style=""></u-line>
					<view class="" @click="dateChange" style="display: flex;justify-content: space-between;margin-top: 20rpx;">
						<text>{{date}}</text>
						<img style="width: 20rpx;height:20rpx;" src="../static/right.png" alt="">
					</view>
				</view>
			</view>
			<view class="container-back">
				<view class="back padding20 ">
					<view class="flex Jbetween padding-bottom20 ">
						<view class="fontWeight">本月酒店总客房数</view>
						<view class="textColor fontWeight">
							总客房数：{{Number(king)+Number(double)+Number(more)+Number(family)+Number(suite)+Number(other_bed) || 0}}
							间 </view>
					</view>
					<view class="travel-list flex Jbetween Acenter page" >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 70rpx;height: 70rpx;" src="../../../static/dachuangfang.png"
									mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">大床房</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="king"  :value="king" 
								@input="kingChange" />
							<text style="flex: 2;text-align: right;">间</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page" >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 60rpx;height: 60rpx;" src="../../../static/shuangchuangfang.png"
									mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">双床房</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="double" :value="double" 
								@input="doubleChange" />
							<text style="flex: 2;text-align: right;">间</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page" >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/sanchuang.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">3床房以上</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="more" :value="more" 
								@input="moreChange" />
							<text style="flex: 2;text-align: right;">间</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page" >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/jiating.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">家庭房</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="family"  :value="family"
								@input="familyChange" />
							<text style="flex: 2;text-align: right;">间</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page" >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/taofang.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">套房</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="suite"  :value="suite"
								@input="suiteChange" />
							<text style="flex: 2;text-align: right;">间</text>
						</view>
					</view>
					<view class="flex Jbetween Acenter page" >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block flex Jcenter Acenter"
								style="width: 80rpx;height: 80rpx;border-radius: 15rpx;margin-right: 20rpx;margin-left: 10rpx;margin-top: 10rpx; margin-bottom: 10rpx;">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/qita.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">其它</text>
							<input style="flex: 1;margin-left: 10rpx;" type="text" value="" placeholder="具体名目" :value="other_bedmingmu"
								@input="other_bedmingmuChange" name="other_bedqitadata" />
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="other_bed"  :value="other_bed"
								@input="other_bedChange" />
							<text style="flex: 2;text-align: right;">间</text>
						</view>
					</view>
				</view>
			</view>
			<view class="container-back" style="padding-top:0">
				<view class="back padding20 ">
					<view class="flex Jbetween padding-bottom20 ">
						<view class="fontWeight" style="flex:5">本月酒店入住率</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" @input="hotel_rateChange" style="flex: 1;"   :value="hotel_rate"/>
							<text style="text-align: right;margin-right:10rpx">%</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page">
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 70rpx;height: 70rpx;" src="../../../static/dachuangfang.png"
									mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">大床房</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="king_rate" @input="king_rateChange"  :value="king_rate" />
							<text style="flex: 2;text-align: right;">%</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page">
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 60rpx;height: 60rpx;" src="../../../static/shuangchuangfang.png"
									mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">双床房</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="double_rate"  :value="double_rate"/>
							<text style="flex: 2;text-align: right;">%</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page">
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/sanchuang.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">3床房以上</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="more_rate"  :value="more_rate"/>
							<text style="flex: 2;text-align: right;">%</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page">
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/jiating.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">家庭房</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="family_rate"   :value="family_rate"/>
							<text style="flex: 2;text-align: right;">%</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page">
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/taofang.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">套房</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="suite_rate"  :value="suite_rate" />
							<text style="flex: 2;text-align: right;">%</text>
						</view>
					</view>
					<view class="flex Jbetween Acenter page"
						style="border-radius: 15rpx;padding: 10rpx;margin-bottom: 20rpx;">
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block flex Jcenter Acenter"
								style="width: 80rpx;height: 80rpx;border-radius: 15rpx;margin-right: 20rpx;">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/qita.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">其它</text>
							<input style="flex: 1;margin-left: 10rpx;" type="text" :value="other_ratemingmu" placeholder="具体名目"
								@input="other_ratemingmuChange" name="other_rateqitadata"  />
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="other_rate"
								@input="other_rateChange"  :value="other_rate"/>
							<text style="flex: 2;text-align: right;">%</text>
						</view>
					</view>
				</view>
			</view>
			<view class="container-back" style="padding-top:0">
				<view class="back padding20 ">
					<view class="travel-list flex Jbetween Acenter ">
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight " style="color: #515151;"><text
									class="">本月民宿客单价</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="guest" style="flex:1"   :value="guest"/>
							<text style="text-align: right;">人民币元</text>
						</view>
					</view>
				</view>
			</view>
			<view class="container-back" style="padding-top:0">
				<view class="back padding20 ">
					<view class="flex Jbetween padding-bottom20 ">
						<view class="fontWeight">本月营业收入</view>
						<view class="textColor fontWeight">
							总收入：{{Number(revenue)+Number(income)+Number(retail)+Number(other_income) || 0}} 人民币元</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page">
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/kefang.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">客房收入</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="revenue"  :value="revenue"
								@input="revenueChange" style="flex:1"/>
							<text style="text-align: right;">人民币元</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page">
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/canyinshouru.png"
									mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">餐饮收入</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="income" :value="income"
								@input="incomeChange" style="flex:1"/>
							<text style="text-align: right;">人民币元</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page">
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/lingshou.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">零售收入</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="retail"  :value="retail"
								@input="retailChange" />
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page">
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/qitashouru.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">其他收入</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="other_income" :value="other_income"
								@input="other_incomeChange" />
						</view>
					</view> 
				</view>
			</view>
			<view class="container-back" style="padding-top:0">
				<view class="back padding20 ">
					<view class="travel-list flex Jbetween Acenter ">
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight " style="color: #515151;"><text
									class="">本月接待游客人数</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input style="flex: 1;" type="digit" placeholder="点击输入" class="padding-left30" :value="number_tourists"
								name="number_tourists" />
							<text style="text-align: right;">人次</text>
						</view>
					</view>
				</view>
			</view>
			<view class="container-back" style="padding-top:0">
				<view class="back padding20 ">
					<view class="flex Jbetween padding-bottom20 ">
						<view class="fontWeight">本月燃气量</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page">
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 60rpx;height: 60rpx;" src="../../../static/tianranqi.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">天然气</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input style="flex: 1;" type="digit" placeholder="点击输入" class="padding-left30" :value="natural_gas"
								name="natural_gas" />
							<text style="text-align: right;">(标准立方米)</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page">
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/meiqi.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">煤气</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input style="flex: 1;" type="digit" placeholder="点击输入" class="padding-left30" :value="coal_gas"
								name="coal_gas" />
							<text style="text-align: right;">(字)</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page">
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/qita.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">其它</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input style="flex: 1;" type="text" placeholder="具体名目" class="padding-left30" :value="other_gas"
								name="other_gas" @input="otherChange" />
							<text style="text-align: right;"></text>
						</view>
					</view>
				</view>
			</view>
			<view class="container-back" style="padding-top:0">
				<view class="back padding20 ">
					<view class="travel-list flex Jbetween Acenter ">
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight " style="color: #515151;"><text>本月员工总数</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="total_month" style="flex:1"   :value="total_month"/>
							<text style="text-align: right;">人</text>
						</view>
					</view>
				</view>
			</view>
			<view class="container-back" style="padding-top:0">
				<view class="back padding20 ">
					<view class="travel-list flex Jbetween Acenter ">
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight " style="color: #515151;"><text>本月员工平均工资</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="average" style="flex:1" :value="average"/>
							<text style="text-align: right;">人民币元</text>
						</view>
					</view>
				</view>
			</view>
			<view class="container-back" style="padding-top:0">
				<view class="back padding20 ">
					<view class="travel-list flex Jbetween Acenter ">
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight " style="color: #515151;"><text>本月用水量</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="water_consum" style="flex:1" :value="water_consum"/>
							<text style="text-align: right;">吨</text>
						</view>
					</view>
				</view>
			</view>
			<view class="container-back" style="padding-top:0">
				<view class="back padding20 ">
					<view class="travel-list flex Jbetween Acenter ">
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight " style="color: #515151;"><text>本月用电量</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="electricity" style="flex:1"  :value="electricity"/>
							<text style="text-align: right;">度</text>
						</view>
					</view>
				</view>
			</view>
			<view class="container-back" style="padding-top:0">
				<view class="back padding20 ">
					<view class="travel-list flex Jbetween Acenter " style="margin-top: 40rpx;">
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight " style="color: #515151;"><text>本月物业管理费用</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="property" style="flex:1" :value="property"/>
							<text style="text-align: right;">人民币元</text>
						</view>
					</view>
				</view>
			</view>
			<view class="container-back" style="padding-top:0">
				<view class="back padding20 ">
					<view class="travel-list flex Jbetween Acenter ">
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight " style="color: #515151;"><text>本月租赁费用</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="rental_expen" style="flex:1" :value="rental_expen"/>
							<text style="text-align: right;">人民币元</text>
						</view>
					</view>
				</view>
			</view>
			<view class="container-back" style="padding-top:0">
				<view class="back padding20 ">
					<view class="travel-list flex Jbetween Acenter ">
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight " style="color: #515151;"><text>本月维修（护）费用</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="mainten" style="flex:1"  :value="mainten"/>
							<text style="text-align: right;">人民币元</text>
						</view>
					</view>
				</view>
			</view>
		    </uni-transition>
			<view class="button-submit">
				<view class="button">
					<button formType="submit" style="margin-top: 0; width: 100%">{{object.adopt_id==2?'重新提交':"提交"}}</button>
				</view>
			</view>
		</form>
		<!-- 日期选择器 -->
		  <u-picker mode="time" v-model="isPicderShow" :params="params" @confirm="confirm"></u-picker>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				date:'请选择',
				 isPicderShow: false,
				object:{
					adopt_id: "", //审核是否通过
					fail: "记账内容需重新提交，有问题请联系联络人。", //未通过原因
					type_id:""//1  参团   2  非参团
				},
				params: {
					year: true,
					month: true,
					day: false,
					hour: false,
					minute: false,
					second: false
				},
				operating: "", //本月营业总收入
				total_hotel: "", //总客房数
				king: '', //大床房
				double: '', //双床房
				more: '', //3创房以上
				family: '', //家庭房
				suite: '', //套房
				other_bed: '', //其它
				revenue: '', //客房收入
				income: "", //餐饮收入
				retail: '', //零售收入
				other_income: '', //其它收入
				otherName: '', //具体名目
				other_bedmingmu: null, //酒店总客房数  其他名目
				other_rate: '', //本月酒店入住率里的其它
				other_ratemingmu: '', //本月酒店入住率里的其它名目
				hotel_rate: '',//本月酒店入住率
				king_rate:'',//本月酒店入住率大床房
				double_rate:'',//双床房入住率
				more_rate:'',//3床房以上入住率
				family_rate:'',//家庭房入住率
				suite_rate:'',//套房入住率
				guest:'',//本月酒店客单价赋值
				income:'',//餐饮收入赋值
				revenue:'',//客房收入赋值
				retail:'',//零售收入赋值
				other_income:'',//其它收入赋值
				number_tourists:'',//本月接待游客人数
				other_gas:'',//本月燃气量其它名目
				coal_gas:"",//煤气
				natural_gas:"",//天然气
				total_month:"",//本月员工总数
				average:"",//本月员工平均工资
				water_consum:"",//本月用水量
				electricity:"",//本月用电量
				property:"",//物业管理费
				rental_expen:"",//租赁费
				mainten:"",//维修费用
				timestamp:'',//当前日期时间
				jizhang_score:null//记账累计分数
			}
		},
		onLoad(options) {
			var myDate = new Date();//获取系统当前时间
			this.timestamp=myDate .getDate(); //获取当前日(1-31)
			var  year=myDate.getFullYear()
			var  month=myDate.getMonth()+1
			if(this.timestamp<10){//10号以内积分10分 否则积分1分
				this.jizhang_score=3
			}else{
				this.jizhang_score=1
			}
			
			let userInfo=uni.getStorageSync("userInfo")
			
			var ID=userInfo[0].id//用户id赋值
			
			if(userInfo){
				if(userInfo.user_type==="法人"){
					this.user_type=1
				}else if(userInfo.user_type==="联络人"){
					this.user_type=2
				}
				this.business_specific_type=userInfo[0].business_specific_type
			}
			var params= JSON.parse(options.item)
			console.log('获取历史记账页传递过来的列表参数paramsparamsparams',params)
			if(params.clickType==='new'){//说明是重新提交跳转过来的
				console.log('走的重新提交跳转过来的', params)
				this.date=year+" 年 "+params.month+" 月 "
				this.year=year
				this.month=params.month
				this.object.adopt_id = params.adopt_id   //1  待审核   2  未通过  3.已通过
				this.object.fail = params.fail?params.fail:"记账内容需重新提交，有问题请联系联络人。" //失败原因
				this.object.type_id=params.type_id//法人记账类型
				this.id=params.id
				console.log('最终赋值后的参数',params,this.object)
				
				let obj={
					id: params.id,
					user_type : params.user_type,
					month:params.month,
					keyword:params.col == 1 ? 'totel' : 'turnover',
					type_id:params.type_id
				}
				// 调用详情赋值数据
				this.getBillDetails(obj)
				
			}else if(params.clickType==='add'){ 
				console.log('正常点击加号跳转过来的正常点击加号跳转过来的正常点击加号跳转过来的正', params)
				this.id=userInfo[0].id
				console.log('month',month)
				if(month==1){
					this.month=12
					this.year=year-1//去上个年份
				}else{
					this.year=year
					this.month=month
				}
				// 赋值年份和月份
				this.date=year+" 年 "+month+" 月 "
				
			}else if(params.clickType==='month'){
				console.log('点击月份跳转进来德点击月份跳转进来德点击月份跳转进来德点击月份跳转进来德', params)
				if(params.month){//如果有值说明是点击了日历月份。。否则就正常传递当前鱼粉
					let newMonth=Number(params.month)
					console.log('有值',newMonth)
					this.month=newMonth
				    // 赋值年份和月份
					this.date=params.year+" 年 "+params.month+" 月 "
					this.year=params.year
					
				}else {//否则赋值当前年份和月份 
					this.date=year+" 年 "+month+" 月 "
				}
				this.id=params.id
				console.log('之后',this.month)
			}else{
				console.log('联络人帮忙记账过来的',params)
				this.id=params.id
				this.year=params.year
				this.month=params.month
				this.business_specific_type=params.business_specific_type
				this.jizhang_score=params.jizhang_score
				this.user_type=params.user_type
				this.date=params.year+" 年 "+params.month+" 月 "//日期自动赋值
			}
		},
		methods: {
			king_rateChange:function(e){//本月酒店入住率大床房输入事件
				console.log('输入的是',e.detail.value)
			},
			hotel_rateChange: function(e) {
				this.hotel_rate = e.detail.value
			},
			kingChange(e) {
				this.king = e.detail.value
			}, //大床房
			doubleChange: function(e) {
				this.double = e.detail.value
			}, //双床房
			moreChange: function(e) {
				this.more = e.detail.value
			}, //双床房
			familyChange: function(e) {
				this.family = e.detail.value
			}, //双床房
			suiteChange: function(e) {
				this.suite = e.detail.value
			}, //双床房
			other_bedChange: function(e) {
				this.other_bed = e.detail.value
			}, //双床房
			revenueChange: function(e) {
				this.revenue = e.detail.value
			}, //双床房
			incomeChange: function(e) {
				this.income = e.detail.value
			}, //双床房
			retailChange: function(e) {
				this.retail = e.detail.value
			}, //双床房
			other_incomeChange: function(e) {
				this.other_income = e.detail.value
			}, //双床房
			otherNameChange: function(e) {
				this.otherName = e.detail.value
			},
			otherChange: function(e) {
				this.other_gas = e.detail.value
			},
			other_bedmingmuChange: function(e) {
				this.other_bedmingmu = e.detail.value
				console.log('你输入的酒店总客房数其他', this.other_bedmingmu)
			},
			other_rateChange: function(e) {
				this.other_rate = e.detail.value
				console.log('本月酒店入住率里的其它', this.other_rate)
			},
			other_ratemingmuChange: function(e) {
				this.other_ratemingmu = e.detail.value
				console.log('本月酒店入住率里的其它名目', this.other_ratemingmu)
			},
			// 获取详情数据
			getBillDetails(obj) {
				console.log('即将请求数据',obj)
				var _self = this;
				this.$.tipLoading('加载中')
				uni.request({
					method: 'POST',
					url: 'https://jizhang.xqyu.cn/index.php/api/index/get_bill_details',
					dataType: 'json',
					header: {
						'content-type': 'application/x-www-form-urlencoded'
					},
					data:obj,
					success: function(res) {
						if(res.data.code==1){
							let result=res.data.data
							console.log('获取乡村民宿记账列表详情数据获取乡村民宿记账列表详情数据获取乡村民宿记账列表详情数据获取乡村民宿记账列表详情数据获取乡村民宿记账列表详情数据获取乡村民宿记账列表详情数据',result)
							_self.king=result.king//酒店大床房赋值
							_self.king=result.king//酒店大床房赋值
							_self.double=result.double//酒店双床房赋值
							_self.more=result.more//酒店双床房赋值
							_self.family=result.family//酒店家庭房房赋值
							_self.suite=result.suite//酒店套房赋值
							_self.other_bed=(result.other_bed).split('-')[0]//酒店客房房房赋值
							_self.other_bedmingmu=(result.other_bed).split('-')[1]//酒店客房其他赋值
							
							_self.hotel_rate=result.hotel_rate//本月酒店入住率赋值
							_self.king_rate=result.king_rate//大床房入住率赋值
							_self.double_rate=result.double_rate//双床房入住率房赋值
							_self.more_rate=result.more_rate//3床房以上入住率赋值
							_self.family_rate=result.family_rate//家庭房入住率房赋值 
							_self.suite_rate=result.suite_rate//套房房赋值
							_self.other_rate=(result.other_rate).split('-')[0]//其它入住率赋值
							_self.other_ratemingmu=(result.other_rate).split('-')[1]//其它入住率名目 赋值
							
							_self.guest=result.guest//本月酒店客单价赋值
							_self.income=result.income//餐饮收入赋值
							_self.revenue=result.revenue//客房收入赋值
							_self.retail=result.retail//零售收入赋值
							_self.other_income=result.other_income//其它收入赋值
							_self.number_tourists=result.number_tourists//本月接待游客人数赋值
							
							_self.natural_gas=result.natural_gas//天然气赋值
							_self.coal_gas=result.coal_gas//煤气赋值
							_self.other_gas=result.other_gas//本燃气量其它名目赋值
							
							_self.total_month=result.total_month//本月员工总数赋值
							_self.average=result.average//本月员工平均工资赋值
							_self.water_consum=result.water_consum//本月用水量赋值
							_self.electricity=result.electricity//本月用电量赋值
							_self.property=result.property//本月物业管理费赋值
							_self.rental_expen=result.rental_expen//租赁费赋值
							_self.mainten=result.mainten//本月维修费用赋值
							_self.$.hideLoading()
						}else{
							_self.$.hideLoading()
							_self.$.toast(res.data.msg)
						}
					}
				})
			},
			// 日期选择器打开
			dateChange:function(){
				this.isPicderShow=true
				console.log('打开',this.isPicderShow)
			},
			// 日期选择器确定
			confirm:function(e){
				console.log('日期选择器确定',e)
				let year=Number(e.year) 
				let month= Number(e.month)
				var myDate = new Date();//获取系统当前时间
				let newYear=myDate.getFullYear()
				let newMonth=myDate.getMonth()+1
				console.log('nia',year)
				console.log('nia1',newYear)
				if(year>newYear){
					this.$.toast('不支持之后年份记账')
					return
				}
				if(month>newMonth){
					this.$.toast('不支持之后月份记账')
					return
				}
				this.date=year+" 年 "+month+" 月 "
			},
			// 表单提交
			formSubmit: function(e) {
				var that = this;
				let data = e.detail.value
				let {
					king,
					double,
					more,
					family,
					suite,
					other_bed,
					king_rate,
					double_rate,
					more_rate,
					family_rate,
					suite_rate,
					other_rate,
					guest,
					revenue,
					income,
					retail,
					other_income,
					number_tourists,
					total_month,
					average,
					water_consum,
					electricity,
					natural_gas,
					coal_gas,
					otherName,
					other_gas,
					property,
					rental_expen,
					mainten
				} = data //结构对象
				if (!king) {
					this.$.toast('请输入本月酒店总客房数大床房')
					return
				}
				if (!double) {
					this.$.toast('请输入本月酒店总客房数双床房')
					return
				}
				if (!more) {
					this.$.toast('请输入本月酒店总客房数3床房以上')
					return
				}
				if (!family) {
					this.$.toast('请输入本月酒店总客房数家庭房')
					return
				}
				if (!suite) {
					this.$.toast('请输入本月酒店总客房数套房')
					return
				}
				if (!other_bed) {
					this.$.toast('请输入本月酒店客房数里的其他客房')
					return
				}
				console.log('oteur', other_bed)
				if (Number(this.other_bed) > 0 && this.other_bedmingmu == '') {
					this.$.toast('请输入本月酒店客房数里的其他客房名目')
					return
				}
				if (this.hotel_rate == null || this.hotel_rate.length == 0) {
					this.$.toast('请输入本月酒店入住率')
					return
				}
				if (Number(this.hotel_rate) > 100) {
					this.$.toast('本月酒店入住率大于100%，请输入正确的入住率')
					return
				}
				if (!king_rate) {
					this.$.toast('请输入本月酒店大床房入住率')
					return
				}
				if (!double_rate) {
					this.$.toast('请输入本月酒店总客房数双床房入住率')
					return
				}
				if (!more_rate) {
					this.$.toast('请输入本月酒店总客房数3床房以上入住率')
					return
				}
				if (!family_rate) {
					this.$.toast('请输入本月酒店总客房数家庭房入住率')
					return
				}
				if (!suite_rate) {
					this.$.toast('请输入本月酒店总客房数套房入住率')
					return
				}
				if (!other_rate) {
					this.$.toast('请输入本月酒店入住率里的其他房入住率')
					return
				}
				if (Number(this.other_rate) > 0 && this.other_ratemingmu == '') {
					this.$.toast('请输入本月酒店入住率里的其他房入住率名目')
					return
				}
				if (!guest) {
					this.$.toast('请输入本月酒店客单价')
					return
				}
				if (!revenue) {
					this.$.toast('请输入客房收入')
					return
				}
				if (!income) {
					this.$.toast('请输入餐饮收入')
					return
				}
				if (!retail) {
					this.$.toast('请输入零售收入')
					return
				}
				if (!other_income) {
					this.$.toast('请输入其他收入')
					return
				}
				if (!natural_gas) {
					this.$.toast('请输入天然气')
					return
				}
				if (!coal_gas) {
					this.$.toast('请输入煤气')
					return
				}
				if (!other_gas) {
					this.$.toast('请输入本月燃气量其他名目')
					return
				}
				// if(this.other_gas=="" ){this.$.toast('请输入其它')
				// return}
				if (!number_tourists) {
					this.$.toast('请输入本月接待游客人数')
					return
				}
				if (!total_month) {
					this.$.toast('请输入本月员工总数')
					return
				}
				if (!average) {
					this.$.toast('请输入本月员工平均工资')
					return
				}
				if (!water_consum) {
					this.$.toast('请输入本月用水量')
					return
				}
				if (!electricity) {
					this.$.toast('请输入本月用电量')
					return
				}
				if (!property) {
					this.$.toast('请输入本月物业管理费用')
					return
				}
				if (!rental_expen) {
					this.$.toast('请输入本月租赁费用')
					return
				}
				if (!mainten) {
					this.$.toast('请输入本月维修（护）费用')
					return
				}
				// e.detail.value.other_gas=e.detail.value.other_gas+'-'+e.detail.value.otherName
				e.detail.value.peting_income = Number(e.detail.value.king) + Number(e.detail.value.double) + Number(e
					.detail.value.more) + Number(e.detail.value.family) + Number(e.detail.value.suite) + Number(e
					.detail.value.other_bed)
				e.detail.value.total_hotel = Number(e.detail.value.revenue) + Number(e.detail.value.income) + Number(e
					.detail.value.retail) + Number(e.detail.value.other_income)
				e.detail.value.other_bed = e.detail.value.other_bed + '-' + e.detail.value.other_bedqitadata
				e.detail.value.other_rate = e.detail.value.other_rate + '-' + this.other_ratemingmu
				e.detail.value.year = this.year
				e.detail.value.month = this.month
				e.detail.value.jizhang_score=this.jizhang_score
				e.detail.value.uid = this.id
				e.detail.value.type_id = this.business_specific_type
				e.detail.value.flag = this.user_type
				e.detail.value.hotel_rate = this.hotel_rate
				e.detail.value.adopt_id=1  //1  待审批   2  未通过  3  已通过  4 初审通过
				e.detail.value.id=this.id  //重新提交传递的ID
				console.log('获取从传递的',e)
				this.formRequest(e.detail.value)
			},
			formRequest: function(params) {
				console.log('获取传递的数据',params)
				delete params.otherName //删除对象属性
				delete params.other_rateqitadata
				delete params.other_bedqitadata
				if(this.object.adopt_id==2){
					// 只有重新提交的时候才删除uid  传id
					delete params.uid
				}else {
					delete params.id
				}
				var that = this
				console.log('传递了', params)
				uni.showModal({
					title: '温馨提示',
					content: '确认提交后不可修改',
					success: function (res) {
						if (res.confirm) {
							uni.request({
								method: 'POST',
								url: 'https://jizhang.xqyu.cn/index.php/api/legal/get_rural',
								dataType: 'json',
								header: {
									'content-type': 'application/x-www-form-urlencoded'
								},
								data: params,
								success: function(res) {
									console.log('最终是否成功了', res.data)
									if (res.data.code == 1) {
										that.$.successToast(res.data.msg)
										//返回上一页
										setTimeout(function() {
											uni.navigateBack({
												delta: 1
											})
										}, 1500)
									} else {
										that.$.toast(res.data.msg)
									}
								}
							});
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			}

		}
	}
</script>

<style lang="scss" scoped>
	.container {
		background-color: #F5F5F5;

		.container-back {
			border-radius: 15rpx;
			padding: 20rpx;

			.travel-list {
				border-radius: 15rpx;
				padding: 10rpx;
				margin-bottom: 20rpx;

				.travel-img {
					width: 80rpx;
					height: 80rpx;
					border-radius: 15rpx;
					margin-right: 20rpx;
				}

				.before::before {
					content: '';
					width: 15rpx;
					height: 15rpx;
					border-radius: 50%;
					background-color: #1D69FC;
					position: absolute;
					margin-top: 12rpx;
					// margin-left: -30rpx;
				}
			}

			.travel-img {
				width: 80rpx;
				height: 80rpx;
				border-radius: 15rpx;
			}
		}

		.button-submit {
			background-color: #FFFFFF;
			position: fixed;
			margin-right: 20rpx;
			bottom: 0;
			width: 100%;
			padding-bottom: 30rpx;
			z-index: 1000;
			padding-left: 20rpx;
			padding-right: 20rpx;
			padding-top: 20rpx;

			.button {
				border-radius: 15rpx;

				button {
					background: linear-gradient(159deg, #80e6fc 0%, #0051ff 99%);
					// width: 100%;
					color: #FFFFFF;
					font-size: 30rpx;
				}
			}
		}
	}
</style>
